<?php
class Faculty_Meeting_Status_Model extends CI_Model {
    //exp_fmis_meeting_status


	public function __construct(){
		parent::__construct();

        $this->load->database();
	}

    public function getAll()
    {
        $sql = "SELECT * FROM exp_fmis_meeting_status";
        $query =  $this->db->query($sql);
        $result = $query->result_array();
        return $result;
    }

    public function getById($id = 0)
    {
        $sql = "SELECT * FROM exp_fmis_meeting_status WHERE ID LIKE ?";
        $query =  $this->db->query($sql, $id);
        $result = $query->row_array();
        return $result;
    }

    public function getStatusToArray($retVal)
    {
        foreach($retVal as &$row)
        {
            $row['Description'] = $this->getById($row['Status'])['Description'];
        }
        return $retVal;
    }




}
